

namespace ciji.Core
{
    /// <summary>
    /// 
    /// </summary>
    [SugarTable("cts_JZPerson", "", IsDisabledUpdateAll = true)]
    public class cts_JZPerson : DEntityBase
    {
         

        /// <summary>
        /// 姓名
        /// </summary>
        [SugarColumn(ColumnDescription = "姓名")]
        public string Name { get; set; }

        /// <summary>
        /// 身份证号
        /// </summary>
        [SugarColumn(ColumnDescription = "身份证号")]
        public string IdCardNo { get; set; }

        /// <summary>
        /// 出生日期
        /// </summary>
        [SugarColumn(ColumnDescription = "出生日期")]
        public string Birthday { get; set; }

        /// <summary>
        /// 年龄
        /// </summary>
        [SugarColumn(ColumnDescription = "年龄")]
        public int Age { get; set; }

        /// <summary>
        /// 性别
        /// </summary>
        [SugarColumn(ColumnDescription = "性别")]
        public string Sex { get; set; }

        /// <summary>
        /// 联系电话
        /// </summary>
        [SugarColumn(ColumnDescription = "联系电话")]
        public string Phone { get; set; }

        /// <summary>
        /// 住址
        /// </summary>
        [SugarColumn(ColumnDescription = "住址")]
        public string Address { get; set; }

        /// <summary>
        /// 乡镇
        /// </summary>
        [SugarColumn(ColumnDescription = "乡镇")]
        public string Town { get; set; }

        /// <summary>
        /// 社区
        /// </summary>
        [SugarColumn(ColumnDescription = "社区")]
        public string Community { get; set; }

        /// <summary>
        /// 是否为新增
        /// </summary>
        [SugarColumn(ColumnDescription = "是否为新增")]
        public int IsNew { get; set; }

        /// <summary>
        /// 是否存档
        /// </summary>
        [SugarColumn(ColumnDescription = "是否存档")]
        public int IsSaved { get; set; }

        /// <summary>
        /// 所属项目Id
        /// </summary>
        [SugarColumn(ColumnDescription = "所属项目Id")]
        public string GroupId { get; set; }

        /// <summary>
        /// 所属项目名称
        /// </summary>
        [SugarColumn(ColumnDescription = "所属项目名称")]
        public string GroupName { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [SugarColumn(ColumnDescription = "排序")]
        public int OrderIndex { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [SugarColumn(ColumnDescription = "备注")]
        public string Remark { get; set; }

        /// <summary>
        /// 家庭人口
        /// </summary>
        [SugarColumn(ColumnDescription = "家庭人口")]
        public int FamilyCount { get; set; }

        /// <summary>
        /// 保障人口
        /// </summary>
        [SugarColumn(ColumnDescription = "保障人口")]
        public int EnsureCount { get; set; }

        /// <summary>
        /// 家庭收入
        /// </summary>
        [SugarColumn(ColumnDescription = "家庭收入")]
        public decimal? FamilyIncome { get; set; }

        /// <summary>
        /// 人均收入
        /// </summary>
        [SugarColumn(ColumnDescription = "人均收入")]
        public decimal? AvgIncome { get; set; }

        /// <summary>
        /// 金融资产
        /// </summary>
        [SugarColumn(ColumnDescription = "金融资产")]
        public decimal? FinanceAssets { get; set; }

        /// <summary>
        /// 其他财产情况
        /// </summary>
        [SugarColumn(ColumnDescription = "其他财产情况")]
        public string OtherIncome { get; set; }

        /// <summary>
        /// 住房套数
        /// </summary>
        [SugarColumn(ColumnDescription = "住房套数")]
        public int HouseCount { get; set; }

        /// <summary>
        /// 住房面积
        /// </summary>
        [SugarColumn(ColumnDescription = "住房面积")]
        public decimal? HouseArea { get; set; }

        /// <summary>
        /// 致贫原因
        /// </summary>
        [SugarColumn(ColumnDescription = "致贫原因")]
        public string PoorReason { get; set; }

        /// <summary>
        /// 月保障金
        /// </summary>
        [SugarColumn(ColumnDescription = "月保障金")]
        public decimal? MonthMoney { get; set; }

        /// <summary>
        /// 0正常4无法评估
        /// </summary>
        [SugarColumn(ColumnDescription = "0正常4无法评估")]
        public int State { get; set; }

        /// <summary>
        /// 
        /// </summary>
        [SugarColumn(ColumnDescription = "")]
        public int GroupType { get; set; }


        [SugarColumn(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(Gid), nameof(cts_JZInfo.DBPersonId))]
        public cts_JZInfo DBInfo { get; set; }

         

        [SugarColumn(IsIgnore = true)]
        public string IsRecordName => DBInfo?.IsRecord == 1 ? "是" : "否";

        [SugarColumn(IsIgnore = true)]
        public string StateName => Util.GetDBState(DBInfo?.State);

        [SugarColumn(IsIgnore = true)]
        public string EmployeeName => DBInfo?.sys_CreaterName;

        [SugarColumn(IsIgnore = true)]
        public string PoorDesc => DBInfo?.PoorDesc;

        [SugarColumn(IsIgnore = true)]
        public string DBRemark => DBInfo?.Remark;

        [SugarColumn(IsIgnore = true)]
        public string FinalResult2 => DBInfo?.FinalResult2;

        [SugarColumn(IsIgnore = true)]
        public decimal? InComeAvg => DBInfo?.InComeAvg;

    }
}